import { IsOptional, IsString, Length } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class UpdateRoleDto {
  @ApiProperty({ description: '角色名称', required: false, example: '管理员' })
  @IsString()
  @IsOptional()
  @Length(2, 20)
  name?: string;

  @ApiProperty({
    description: '角色描述',
    required: false,
    example: '系统管理员角色',
  })
  @IsString()
  @IsOptional()
  description?: string;
}
